<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="windows-Target" content="_top">
	<meta name="Author"  content="nickcheng">
	<title>测试表单</title>
	<link href="../css/formitem.css" rel="stylesheet" type="text/css" />
	<link href="../datepicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="../jquery.form-1.0.1.js"></script>
	<script type="text/javascript" src="../jquery.form.valid-1.0.1.js"></script>
	<script type="text/javascript" src="../area/areaLinkAge.js"></script>
	<script type="text/javascript" src="../Calendar.js"></script>
	<script type="text/javascript">
		$(function(){
			$("#username").username();
			$("#password").password();
			$("#confirmpwd").confirmpwd();
			$("#age").number();
			$("#personinfo").textarea();
			$("#companyname").chineseName();
			$("#addressdetail").address();
			$("#qq").qq();
			$("#realName").realName();
			$("#email").email();
			$("#idcard").idcard();
			$("#phone").phone();
			$("#mobile").mobile();
			$("#zipcode").zipcode();
			$("#authcode").authcode();
			$("#regfund").money();
			$("#createDate").datetime();
			$("#province").provinceAndCity();
			$("#companyscale").commonSelect();
			$("#htmlsave").htmlform();
			$("#ajaxsave").ajaxform();
			$("form").find("input[type!='radio'][type!='checkbox'][type!='button'][type!='submit'][type!='reset']").each(function(){
				$(this).addClass("form_item_input");
			});
		});
	</script>
</head>
<body>
	<h1>表单测试</h1>
	<fieldset id="testfildset">
		<legend>表单</legend>
		<form action="register_do.jsp" id="testform" method="post">
			<h2>基本信息</h2>
			<table class="formtable">
			<tr>
				<th>
					<label class="form-item-title">用户名：</label>
				</th>
				<td>
					<input id="username" type="text" required="true"  valid='username'/>
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">真实姓名：</label>
				</th>
				<td>
					<input id="realName" type="text" required="true"  valid='realName'/>
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">密码：</label>
				</th>
				<td>
					<input type="password" id="password" required="true"   valid='password'/>
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">确认密码：</label>
				</th>
				<td>
					<input type="password" id="confirmpwd" required="true"   valid='confirmpwd'/>
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">性别：</label>
				</th>
				<td>
					男<input type="radio" id="male" name="sex" value="1">
					女<input type="radio" id="female" name="sex" value="0"> 
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">学号：</label>
				</th>
				<td>
					<input type="text" name="stuNum" id="age" required="true" valid='number'  />
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">爱好：</label>
				</th>
				<td>
					运动<input type="checkbox" id="sports"/>
					艺术<input type="checkbox" id="sports"/>
					上网<input type="checkbox" id="sports"/>
					看书<input type="checkbox" id="sports"/>
					听音乐<input type="checkbox" id="sports"/>
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">个人简介：</label>
				</th>
				<td>
					<textarea rows="5" cols="30" id="personinfo" required="true"></textarea>
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">所在地区：</label>
				</th>
				<td>
				   <select id="province" name="province">
						<option>请选择</option>	
				   </select>
				   <select id="city" name="city">
				   		<option>全部</option>
				   </select>
				</td>
			</tr>
			<tr>
				<th>
				 	<label class="form-item-title">详细地址：</label>
				</th>
				<td>
					 <input type="text" id="addressdetail"  required="true" valid='address' />
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title"> 邮政编码：</label>
				</th>
				<td>
					<input type="text" id="zipcode" valid='zipcode' />
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title"> 身份证号：</label>
				</th>
				<td>
					<input type="text" id="idcard"  size="30" maxlength="19" valid='idcard' />
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title"> 联系电话：</label>
				</th>
				<td>
					<input type="text" id="phone" valid='phone' />
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title"> 手机号：</label>
				</th>
				<td>
					<input type="text" id="mobile" valid='mobile' ></input>
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title"> Email：</label>
				</th>
				<td>
					<input type="text" id="email" valid='email' ></input>
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">QQ：</label>
				</th>
				<td>
					<input type="text" id="qq" valid='qq' />
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">公司名称：</label>
				</th>
				<td>
					<input type="text" id="companyname" valid='chineseName' />
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">公司注册资金：</label>
				</th>
				<td>
					<input type="text" id="regfund" valid='money' />
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">公司创建日期：</label>
				</th>
				<td>
					<input type="text" name="createDate" id="createDate"  valid='datetime'/>
					
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">公司规模：</label>
				</th>
				<td>
				<select id="companyscale" valid="commonSelect"  required="true">
						<option value="-1">请选择</option>
						<option>1000人以上</option>
						<option>500-1000人</option>
						<option>300-500人</option>
						<option>100-300人</option>
						<option>50-100人</option>
						<option>50人以下</option>
				   </select>
				</td>
			</tr>
			<tr>
				<th>
				<label class="form-item-title" >公司性质：</label>
				</th>
				<td>
						<select id="companytype">
							<option value="-1">请选择</option>
							<option>国企</option>
							<option>私企</option>
							<option>外企</option>
					   </select>
				</td>
			</tr>
			<tr>
				<th>
					<label class="form-item-title">验证码：</label>
				</th>
				<td>
					<input type="text" id="authcode" />
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<input type="button" id="htmlsave" value="html保存" />
					<input type="button" id="ajaxsave" value="ajax保存" />
				</td>
			</tr>
			</table>
		</form>
	</fieldset>
</body>
</html>